<!DOCTYPE html>
<html data-dpr="2" style="font-size: 62.32px;">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title></title>
    <link rel="stylesheet" href="/js/plugins/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <script src="/js/plugins/jquery/jquery.min.js"></script>
    <script src="/js/plugins/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
    <link rel="apple-touch-icon" href="https://images.mafengwo.net/mobile/images/mfw-logo-new.png">
    <link href="/css/answerQuestion1.css" rel="stylesheet" type="text/css">
    <link href="/css/answerQuestion2.css" rel="stylesheet" type="text/css">
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <script src="/js/common.js"></script>
    <link href="/css/mobile+css+head_mobile+css+ui%5EYVw%5E1526627473.css" rel="stylesheet" type="text/css">
    <link href="/css/ask.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css"/>
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script>
        $(function () {
            var quizzerId = 0;
            var param = getParams();
            if (param.questionId) {
                $.get('/questions/'+param.questionId+'/answerer',function (data) {
                    console.log(data);
                    answerId = data[0].question.user.id;
                    if (data[0].answerer == null) {
                        $('#_j_answer_list').remove()
                    }
                    $('.nums').html('<b>'+ $(data).size() +'</b>回答')
                    $('.q-detail').renderValues(data[0])
                    $('#_j_answer_list').renderValues({list:data},{getHref:getHref});
                })
            }
            $("#_j_add_answer").click(function () {
                $("div[name=answer]").css("display","none")
                $('.Addnew').css("display","");
            });

            $('._j_publish_question').click(function () {
                $.post('/questions/answerer',{"question.id":param.questionId,content:$('#pnl_textarea').val()},function (data) {
                    if (data.success) {
                        window.location.href ="/mine/answerQuestion.html?questionId="+param.questionId;
                    }else {
                        console.log(data.msg);
                        $(document).dialog({
                            type : 'notice',
                            infoText: data.smg,
                            autoClose: 1000,
                            position: 'center'  // center: 居中; bottom: 底部
                        });
                    }
                })
            })
        })
    </script>
</head>
<body style="font-size: 24px;">
<div id="pos38"></div>
<header class="head2home">
    <a href="../index.html" class="logo"></a>
    <div class="rBtn">
        <a href="../index.html" class="home">官网首页</a>
        <a href="../index.html" class="sch"></a>
    </div>
</header>

<div class="container no-padding">
    <div class="q-detail">
        <h3 class="title" render-html="question.title"></h3>
        <p class="desc" render-html="question.content"></p>
        <div class="stat">
            <span class="nums"></span>

        </div>
        <div class="meta">
            <span class="location">全球</span>
            <span class="user"><img render-src="question.user.headImgUrl"><span render-html="question.user.nickName"></span>&nbsp;问于<span class="time" render-html="question.createTime"></span></span>
        </div>
    </div>

    <div id="_j_answer_list" name="answer">
        <div render-loop="list">
        <div class="a-detail a-goldmedal">
            <span class="da"><a data-href="userProfiles.html?userId=" render-key="list.answerer.id" render-fun="getHref"><img render-src="list.answerer.headImgUrl"></a></span>
            <div class="hd">
                <a data-href="../userProfiles.html?userId=" render-key="list.answerer.id" render-fun="getHref" render-html="list.answerer.nickName"></a>
                <span class="time" render-html="list.createTime">2018-07-17</span>
            </div>
            <div class="bd">
                <div class="expandable" style="max-height: 9.33333rem;" render-html="list.content">
                </div>
            </div>
            <div class="ft">
                <a href="" class="btn-comment _j_comment" data-aid="12312404">评论<b>·166</b></a>
                <a class="btn-collect _j_collect ">收藏<b>·369</b></a>
            </div>
            <div class="space"></div>
        </div>

    </div>
    </div>
</div>
<div class="fixed-bot default-pos" name="answer">
    <a class="item " id="_j_care_question" data-num="534"><i class="icon-follow"></i>关注问题(0)</a>
    <a class="item" id="_j_add_answer"><i class="icon-addanswer"></i>添加答案</a>
</div>
<section class="Addnew" style="display: none">
    <div id="_j_publish_box" class="ask_tan_con">
        <dl>
            <dt>为他回答</dt>
            <dd class="con_textarea _j_word" id="con_textarea">
                <textarea rows="1" id="pnl_textarea" class="_j_q_content _j_word_check"></textarea>
                <div class="wordsnum"><span class="_j_word_num">0</span>/<span class="_j_max_num">1000</span></div>
                <div class="err-tips" style="display: none;"></div>
            </dd>
        </dl>

        <dl>
            <dd>
                <a class="_j_publish_question">发布问题</a>
            </dd>
        </dl>
    </div>
</section>
</body>
</html>